<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>九九乘法表</title>
    <style>
        table {
            border-collapse: collapse;
        }
        td {
            padding: 5px;
        }
    </style>
</head>

<body>
    <h2>九九乘法表</h2>
    <script>
        const table = document.createElement('table');
        for (let i = 1; i <= 9; i++) {
            const row = document.createElement('tr');
            if (i % 2!== 0) {
                row.style.backgroundColor = '#DDDDDD';
                row.style.fontWeight = 'bold';
            }
            for (let j = 1; j <= i; j++) {
                const cell = document.createElement('td');
                const result = i * j;
                cell.textContent = `${j}*${i}=${result}`;
                row.appendChild(cell);
            }
            table.appendChild(row);
        }
        document.body.appendChild(table);
    </script>
</body>

</html>
